This section describes how to create your own preview component.
Preview components that create previews have a type of 'pmak' and a subtype that matches the type of the file for which they create previews.
Preview components that display previews have a type of 'pnot' and a subtype that matches the type of the resource that they display.
You can use the following constants to refer to the request codes for each of the functions that your preview component must support.
enum {
kPreviewShowDataSelector = 1, /* PreviewShowData */
kPreviewMakePreviewSelector = 2, /* PreviewMakePreview */
kPreviewMakePreviewReferenceSelector = 3,/* PreviewMakePreviewReference */
kPreviewEventSelector = 4 /* PreviewEvent */
};
This section presents a sample program that displays a preview component for the display of PICS animation files. First it implements the required Component Manager functions. Then it converts the PICT image data into a format for display as a preview.